<template>
	<view>
		<view class="flex m-b p-l-r3 p-t-b4 bg-white align-center justify-between">
			<text class="fs-3 letter-s3 width-1">头像</text>
			<view class="flex align-center" @click="changeImg">
				<image class="border-r1 head-pic" src="/static/logo.png"></image>
				<image class="arrow" src="/static/images/icon_right_arrow.png"></image>
			</view>
		</view>
		<view class="flex p-l-r3 p-t-b4 bg-white align-center justify-between border-botton">
			<text class="fs-3 letter-s3 width-1">性别</text>
			<view class="flex align-center" >
				<radio-group @change="radioChange" class="flex">
					<label  v-for="(item, index) in items" :key="item.value">
						<view class="flex align-center ml">
							<radio style="transform:scale(0.8)" color="#ffeb0f"  :value="item.value" :checked="index === current" />
							<view class="fs-3">{{item.name}}</view>
						</view>
					</label>
				</radio-group>
			</view>
		</view>
		<view class="flex p-l-r3 p-t-b4 bg-white align-center justify-between border-botton">
			<text class="fs-3 width-1">服务中心</text>
			<view class="flex align-center">
				<view class="flex address">
					<image class="arrow m-r1" src="/static/logo.png"></image>
					<text class="flex fs-3 m-r1 info white-space">南宁青秀区昌泰大厦</text>
				</view>
				<image class="arrow" src="/static/images/icon_right_arrow.png"></image>
			</view>
		</view>
		<view class="flex p-l-r3 p-t-b4 bg-white align-center">
			<text class="fs-3 letter-s3 width-1">标签</text>
		</view>
		<view class="p-l-r3 bg-white padding-bottom p-b">
			<textarea class="border width bg-textarea  p-t-b4 p-l-r fs-3" placeholder-class="color-t" placeholder="请输入个人标签,多个标签用空格隔开..."></textarea>
		</view>
		<bright-button title="提交" class="m-t-b"></bright-button>
	</view>
</template>

<script>
import brightButton from '@/components/common/bright-button.vue'
	export default {
		components:{
			brightButton
		},
		data() {
			return {
				items:[{
					value: '男',
                    name: '男'
                },
				{
					value: '女',
				    name: '女'
				}],
				current: 0
			}
		},
		methods: {
			radioChange(evt) {
			            for (let i = 0; i < this.items.length; i++) {
			                if (this.items[i].value === evt.target.value) {
			                    this.current = i;
			                    break;
			                }
			            }
			    },
			changeImg(){
				uni.chooseImage({
				    count: 1, //默认9
				    sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
				    success: function (res) {
				        console.log(JSON.stringify(res));
				    }
				});
			}
		}
	}
</script>

<style scoped>
.m-t-b{margin-top: 240rpx;margin-bottom: 60rpx;}
.address{width: 500rpx;justify-content:flex-end;}
.info{max-width: 400rpx;}
</style>
